package gamejam.game;

import java.awt.Graphics;
import java.awt.Image;
import java.awt.geom.Rectangle2D;

public class Tile {
	private Image img;
	private int x;
	private int y;
	public Tile(Image img, int x, int y) {
		this.img = img;
		this.x = x;
		this.y = y;
	}
	public void draw(Graphics g, int xOff, int yOff) {
		g.drawImage(img, x - xOff, y - yOff, img.getWidth(null), img.getHeight(null), null); 
	}
	public Rectangle2D.Double getBounds() {
		return new Rectangle2D.Double(getX(), getY(), getWidth(), getHeight());
	}
	public int getHeight() {
		return img.getHeight(null);
	}
	public int getWidth() {
		return img.getWidth(null);
	}
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	public void setX(int newX) {
		x = newX; 
	}
	public void setY(int newY) {
		y = newY;
	}
}
